-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KS-129: Implement modify DON #13242
KS-129: Implement modify DON #13242
Conversation
203e604
to
251d23f
Compare
s_dons[donId].isPublic = isPublic; | ||
|
||
DONCapabilityConfig storage donCapabilityConfig = s_dons[donId].config[configCount]; | ||
for (uint256 i; i < nodes.length; ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking a bit on how to optimize this. Currently the code blindly updates the DON's nodes and supported capability configs even if the function parameters are the same as what's already in storage. One idea I had was to store the hash of nodes
and capabilityConfigs
and compare them against the hash of the params passed in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a ticket to test this out during the gas optimization stage?
uint32 configCount = 1; // Initialize config count to start at 1 | ||
_setDONConfig(id, configCount, nodes, capabilityConfigurations, isPublic); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint32 configCount = 1; // Initialize config count to start at 1 | |
_setDONConfig(id, configCount, nodes, capabilityConfigurations, isPublic); | |
_setDONConfig(id, 1, nodes, capabilityConfigurations, isPublic); |
Quality Gate passedIssues Measures |
9e3d804
into
use-encode-instead-of-encode-packed-capability-id
No description provided.